<?php
include_once("../modules/checkA.php");
include_once("../../config.php"); 
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'finance'");
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("detail-function.php");
?>



<?// 申请修改的信息
$apply_detail=select_one_line_all_items($table_Prefix."finance","rid = '".$detail['nid']."' and applystatus = '申请修改' ");
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
</head>

<body>

<div id="topbar">   <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>


<div id="content" class="layui-form">
<h1> 审核修改申请 </h1>


<div class="detail-box verify-edit-box layui-form">
<div class="detail-boxes">
<div class="detail-boxing">


    <form id="verify-member-form" method="post" action="detail-verify-function.php?nav-itemed=member" enctype="multipart/form-data" class="layui-form">
 


        <div class="source-boxing">
<h2>原数据</h2>



			<input type="hidden" name="nid" value="<? echo $detail['nid']?>">

			<div class="layui-form-item">
				<label class="layui-form-label">内容</label>
				<div class="layui-input-block">
					<input type="text" name="name" lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input" value="<?echo $detail['name']?>">
				</div>
			</div>


			<div class="layui-form-item">
				<label class="layui-form-label">金额</label>
				<div class="layui-input-block">
					<input type="text" name="cost" lay-verify="required" placeholder="请输入金额" autocomplete="on" class="layui-input" value="<?echo $detail['cost']?>">
				</div>
			</div>



			<div class="layui-form-item">
				<label class="layui-form-label">日期</label>
				<div class="layui-input-block">
					<input type="text" name="applydate" id="date" autocomplete="off" class="layui-input"  value="<?echo $detail['applydate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
				</div>
			</div>





			<?
			$principal_list=select_lines_all_items($table_Prefix."employee","nid desc","","0");
			$principal=select_one_line_all_items($table_Prefix."employee","nid = '".$detail['principal']."'");
			?>

			<div class="layui-form-item">
				<label class="layui-form-label">用款人</label>
				<div class="layui-input-block">
					<select name="principal" lay-search="">

						<option value="<?echo $detail['principal']?>" > <? echo $detail['principal'] ?> : <? echo $principal['name'] ?></option>
						<option  value="无" > 无</option>

						<? for($i=0;$i<count($principal_list);$i++){ ?>
							<option value="<? echo $principal_list[$i]['nid'] ?>"><? echo $principal_list[$i]['mid'] ?> : <? echo $principal_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>



			<?
			$unit_list=select_lines_all_items($table_Prefix."unit","nid desc","relation != '目标客户' or relation != '无'","0");
			$unit=select_one_line_all_items($table_Prefix."unit","nid = '".$detail['unit']."'");
			?>


			<div class="layui-form-item">
				<label class="layui-form-label">用款单位</label>
				<div class="layui-input-block">
					<select name="unit">
						<option value="<? echo $detail['unit']?>"><? echo $detail['unit']." : ".$unit['name']?></option>
						<option value="">无</option>
						<? for($i=0;$i<count($unit_list);$i++){ ?>
							<option value="<? echo $unit_list[$i]['nid'] ?>"><? echo $unit_list[$i]['nid'] ?> : <? echo $unit_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>


			<div class="layui-form-item">
				<label class="layui-form-label">用途</label>
				<div class="layui-input-block">
					<select name="classify" >
						<option value="<?echo $detail['classify']?>"><?echo $detail['classify']?></option>
						<option value="公众号续费收入">公众号续费收入</option>
						<option value="域名续费收入">域名续费收入</option>
						<option value="服务器续费收入">物料制作收入</option>



						<option value="工资支出">工资支出</option>
						<option value="交通补贴支出">交通补贴支出</option>
						<option value="奖金支出">奖金支出</option>
						<option value="提成支出">提成支出</option>

						<option value="水电费">水电费</option>
						<option value="租赁费">租赁费</option>
						<option value="其他">其他</option>
					</select>
				</div>
			</div>




			<?
			$case_list=select_lines_all_items($table_Prefix."case","nid desc","status ='进行中' or status = '未开始' ","0");
			$case=select_one_line_all_items($table_Prefix."case","nid = '".$detail['caseid']."'");
			?>

			<div class="layui-form-item">
				<label class="layui-form-label">项目</label>
				<div class="layui-input-block">
					<select name="caseid" >
						<option value="<? echo $detail['caseid'] ?>"><? echo $case['name'] ?></option>
						<?for($i=0;$i<count($case_list);$i++){?>
							<option value="<? echo $case_list[$i]['nid'] ?>"><? echo $case_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>






			<?
			$department_list=select_lines_all_items($table_Prefix."department","nid desc","","0");
			$department=select_one_line_all_items($table_Prefix."department","nid = '".$detail['departmentid']."'");
			?>

			<div class="layui-form-item">
				<label class="layui-form-label">部门</label>
				<div class="layui-input-block">
					<select name="departmentid" >
						<option value="<? echo $detail['departmentid'] ?>"><? echo $department['name'] ?></option>
						<?for($i=0;$i<count($department_list);$i++){?>
							<option value="<? echo $department_list[$i]['nid'] ?>"><? echo $department_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>






			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block" >
					<input type="radio" name="status" value="待收款" title="待收款" <? if ($detail['status'] == "待收款") {
						echo "checked";
					} ?>>
					<input type="radio" name="status" value="已收款" title="已收款" <? if ($detail['status'] == "已收款") {
						echo "checked";
					} ?>>
					<input type="radio" name="status" value="烂账" title="烂账" <? if ($detail['status'] == "烂账") {
						echo "checked";
					} ?>>
					<input type="radio" name="status" value="其他" title="其他" <? if ($detail['status'] == "其他") {
						echo "checked";
					} ?>>
				</div>

			</div>





			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-block">
					<textarea name="remark" placeholder="备注" class="layui-textarea"><? echo $detail['remark'] ?></textarea>
				</div>
			</div>

			<!--          源数据表格  -->
        </div>









        <div class="apply-boxing">

            <h2>新数据</h2>


            <input type="hidden" name="rid" value="<? echo $detail['nid']?>">

			<div class="layui-form-item">
				<label class="layui-form-label">内容</label>
				<div class="layui-input-block">
					<input type="text" name="ai_name" lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input" value="<?echo $apply_detail['name']?>">
				</div>
			</div>


			<div class="layui-form-item">
				<label class="layui-form-label">金额</label>
				<div class="layui-input-block">
					<input type="text" name="ai_cost" lay-verify="required" placeholder="请输入金额" autocomplete="on" class="layui-input" value="<?echo $apply_detail['cost']?>">
				</div>
			</div>



			<div class="layui-form-item">
				<label class="layui-form-label">日期</label>
				<div class="layui-input-block">
					<input type="text" name="ai_applydate" id="date" autocomplete="off" class="layui-input"  value="<?echo $apply_detail['applydate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
				</div>
			</div>





			<?
			$principal_list=select_lines_all_items($table_Prefix."employee","nid desc","","0");
			$principal=select_one_line_all_items($table_Prefix."employee","nid = '".$apply_detail['principal']."'");
			?>

			<div class="layui-form-item">
				<label class="layui-form-label">用款人</label>
				<div class="layui-input-block">
					<select name="ai_principal" lay-search="">

						<option value="<?echo $apply_detail['principal']?>" > <? echo $apply_detail['principal'] ?> : <? echo $principal['name'] ?></option>
						<option  value="无" > 无</option>

						<? for($i=0;$i<count($principal_list);$i++){ ?>
							<option value="<? echo $principal_list[$i]['nid'] ?>"><? echo $principal_list[$i]['mid'] ?> : <? echo $principal_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>




			<?
			$unit_list=select_lines_all_items($table_Prefix."unit","nid desc","relation != '目标客户' or relation != '无'","0");
			$apply_unit=select_one_line_all_items($table_Prefix."unit","nid = '".$apply_detail['unit']."'");
			?>


			<div class="layui-form-item">
				<label class="layui-form-label">用款单位</label>
				<div class="layui-input-block">
					<select name="ai_unit">
						<option value="<? echo $apply_detail['unit']?>"><? echo $apply_detail['unit']." : ".$apply_unit['name']?></option>
						<option value="">无</option>
						<? for($i=0;$i<count($unit_list);$i++){ ?>
							<option value="<? echo $unit_list[$i]['nid'] ?>"><? echo $unit_list[$i]['nid'] ?> : <? echo $unit_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>




			<div class="layui-form-item">
				<label class="layui-form-label">用途</label>
				<div class="layui-input-block">
					<select name="ai_classify" >
						<option value="<?echo $apply_detail['classify']?>"><?echo $apply_detail['classify']?></option>
						<option value="公众号续费收入">公众号续费收入</option>
						<option value="域名续费收入">域名续费收入</option>
						<option value="服务器续费收入">物料制作收入</option>



						<option value="工资支出">工资支出</option>
						<option value="交通补贴支出">交通补贴支出</option>
						<option value="奖金支出">奖金支出</option>
						<option value="提成支出">提成支出</option>

						<option value="水电费">水电费</option>
						<option value="租赁费">租赁费</option>
						<option value="其他">其他</option>
					</select>
				</div>
			</div>




			<?
			$case_list=select_lines_all_items($table_Prefix."case","nid desc","status ='进行中' or status = '未开始' ","0");
			$case=select_one_line_all_items($table_Prefix."case","nid = '".$apply_detail['caseid']."'");
			?>

			<div class="layui-form-item">
				<label class="layui-form-label">项目</label>
				<div class="layui-input-block">
					<select name="ai_caseid" >
						<option value="<? echo $apply_detail['caseid'] ?>"><? echo $case['name'] ?></option>
						<?for($i=0;$i<count($case_list);$i++){?>
							<option value="<? echo $case_list[$i]['nid'] ?>"><? echo $case_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>






			<?
			$department_list=select_lines_all_items($table_Prefix."department","nid desc","","0");
			$department=select_one_line_all_items($table_Prefix."department","nid = '".$apply_detail['departmentid']."'");
			?>

			<div class="layui-form-item">
				<label class="layui-form-label">部门</label>
				<div class="layui-input-block">
					<select name="ai_departmentid" >
						<option value="<? echo $apply_detail['departmentid'] ?>"><? echo $department['name'] ?></option>
						<?for($i=0;$i<count($department_list);$i++){?>
							<option value="<? echo $department_list[$i]['nid'] ?>"><? echo $department_list[$i]['name'] ?></option>
						<? } ?>
					</select>
				</div>
			</div>






			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block" >
					<input type="radio" name="ai_status" value="待收款" title="待收款" <? if ($apply_detail['status'] == "待收款") {
						echo "checked";
					} ?>>
					<input type="radio" name="ai_status" value="已收款" title="已收款" <? if ($apply_detail['status'] == "已收款") {
						echo "checked";
					} ?>>
					<input type="radio" name="ai_status" value="烂账" title="烂账" <? if ($apply_detail['status'] == "烂账") {
						echo "checked";
					} ?>>
					<input type="radio" name="ai_status" value="其他" title="其他" <? if ($apply_detail['status'] == "其他") {
						echo "checked";
					} ?>>
				</div>

			</div>





			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-block">
					<textarea name="ai_remark" placeholder="备注" class="layui-textarea"><? echo $apply_detail['remark'] ?></textarea>
				</div>
			</div>



			<input name="sys_part" type="hidden" value="<? echo $system_part ?>"/>
        <input name="nowpageid" type="hidden" value="<? echo $_REQUEST['nowpageid'] ?>"/>
        <input name="sortby" type="hidden" value="<? echo $_REQUEST['sortby'] ?>"/>
        <input name="term_nid" type="hidden" value="<? echo $_REQUEST['term_nid'] ?>"/>



		</div>

        <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>









</div>
</div>
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>
</html>
